package com.liull.netty.nio.bytebuf;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;
import lombok.extern.slf4j.Slf4j;

/**
 * @Author: liull
 * @Description:
 * @Date: Created in 23:02 2021/7/24
 * @Modified By:
 */
@Slf4j
public class ByteBufTest {
    public static void main(String[] args) {
        final ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer();
        System.out.println(buffer);
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < 300; i++) {
            sb.append("L");
        }
        buffer.writeBytes(sb.toString().getBytes());
        System.out.println(buffer);
    }
}
